﻿// Copyright (c) egmkang wang. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace XServer.Config
{
    using System;

    public abstract class ConfigAttribute : Attribute
    {
    }

    [AttributeUsage(AttributeTargets.Class)]
    public class ConfigRootAttribute : ConfigAttribute
    {
        public ConfigRootAttribute()
        {
        }

        /// <summary>
        /// 配置的前缀, XML标记的前缀
        /// </summary>
        public string XmlNode { get; set; }
        /// <summary>
        /// 具体的配置文件名
        /// </summary>
        public string File { get; set; }
    }

    [AttributeUsage(AttributeTargets.Field)]
    public class ConfigElementAttribute : ConfigAttribute
    {
        public ConfigElementAttribute()
        {
        }

        /// <summary>
        /// XML属性的名称(可以用来重命名)
        /// </summary>
        public string Element { get; set; }
    }
}
